package com.xue.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xue.common.core.IBaseDAO;
import com.xue.dao.DemoDAO;
import com.xue.pojo.Demo;

/**
 * Description: service层 <br/>
 * Date: 2017年3月9日 上午11:52:17 <br/>
 * 
 * @author xuejianxin
 */
@Service("DemoService")
public class DemoService implements IDemoService {
	@Autowired
	private DemoDAO dao;

	@Override
	public void saveTest(Demo vo) {
		dao.save(vo);
		System.out.println(1 / 0);// 制造异常测试事务
	}

	@Override
	public IBaseDAO<Demo, Integer> getDao() {
		return dao;
	}
}
